object FunExercise {
  def main(args: Array[String]): Unit = {
    getTriangle(4)
    getMuTable(11)
  }
  def getTriangle(n: Int): Unit = {
    for (i <- 1 to n) {
      for (j <- 1 to n - i) {
        print(" ")
      }
      for (k <- 1 to 2 * i - 1) {
        print("*")
      }
      println()
    }
  }
  def getMuTable(n: Int): Unit = {
    for (i <- 1 to n) {
      for (j <- 1 to i) {
        print(s"$j * $i = ${i * j}\t")
      }
      println()
    }
  }
}
